#import "dfhgwhruebvhrheymagnificenttunnel.h"
#import "dfhgwhruebvhrheyautomobileenroll.h"
@interface dfhgwhruebvhrheyautomobileenroll ()
@property (weak, nonatomic) IBOutlet UITextField *middleName;
@property (weak, nonatomic) IBOutlet UITextField *lastName;
@property (weak, nonatomic) IBOutlet UITextField *IDType;
@property (weak, nonatomic) IBOutlet UITextField *IDNumber;
@property (weak, nonatomic) IBOutlet UITextField *firstName;
@property (weak, nonatomic) IBOutlet UIView *bgView;
@end
@implementation dfhgwhruebvhrheyautomobileenroll {
	CAGradientLayer *gradientLayer;
	void(^_callback)(UIButton *sender, NSString *first, NSString *middle, NSString *last);
}
- (void)awakeFromNib {
	[super awakeFromNib];
	self.bgView.layer.cornerRadius = 20;
	self.bgView.layer.masksToBounds = YES;
	gradientLayer = [CAGradientLayer layer];
	gradientLayer.startPoint = CGPointMake(0, 0);
	gradientLayer.endPoint = CGPointMake(0, 1);
	gradientLayer.colors = @[(__bridge  id)@"#EFECFF".dhgfywegwygeydwlearneddesignate.CGColor, (__bridge  id)[UIColor whiteColor].CGColor];
	gradientLayer.locations = @[@(0.3), @(1.0)];
	[self.bgView.layer insertSublayer:gradientLayer atIndex:0];
}
- (void)bindCardInfo:(dhgfywegwygeydwinsistspecialize *)info {
	self.IDType.text = info.type;
	self.IDNumber.text = info.card_no;
}
- (void)btnClick:(void(^)(UIButton *sender, NSString *first, NSString *middle, NSString *last))callback {
	_callback = callback;
}
- (IBAction)btnsClick:(UIButton *)sender {
	if (_callback) {
		if (sender.tag == 200) {
			if(self.firstName.text.length == 0) {
				return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please Enter Your First Name"];
			}
			if(self.lastName.text.length == 0) {
				return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please Enter Your Last Name"];
			}
			NSString *name = [NSString stringWithFormat:@"%@%@%@",self.firstName.text, self.middleName.text, self.lastName.text];
			if (!name.dhgfywegwygeydwagitationscholarship) {
				return [dfhgwhruebvhrheyoptionsaving.keyWindow show:@"Please input your name in the correct format!"];
			}
		}
		_callback(sender, self.firstName.text, self.middleName.text, self.lastName.text);
	}
}
- (void)layoutSubviews {
	[super layoutSubviews];
	gradientLayer.frame = self.bgView.bounds;
}
@end
